package wlt;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class jdbcTest
{
    public static void main (String[] args) throws ClassNotFoundException, SQLException
    {
        String url = "jdbc:mysql://localhost:3306/test";
        String name = "root";
        String password = "YUNchen@168!";
        
//        //MySQL8.0+ 不需要这句话了
//        Class.forName("com.mysql.jdbc.Driver");
    
        Connection connection = DriverManager.getConnection(url, name, password);
        System.out.println(connection);
    }
}
